package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.ClassificationService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.ClassificationInfoSearchRequest;
import com.tuanzi.loan.vo.response.family.ClassificationInfoListResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

public class ClassificationDataModel extends LazyDataSessionModel<ClassificationInfoSearchRequest,ClassificationInfoListResponse> {

    private static final long serialVersionUID = -3825779406476272240L;

    private ClassificationService classificationService;

    public ClassificationDataModel(ClassificationInfoSearchRequest searchRequest, CurrentUserBean session, ClassificationService classificationService) {
        super(searchRequest, session);
        this.classificationService = classificationService;
    }

    @Override
    protected Page<ClassificationInfoListResponse> doLoad0(PageSearcher<ClassificationInfoSearchRequest> pageSearcher) {
        return classificationService.list(pageSearcher);
    }
}
